import React from "react";
import PropTypes from 'prop-types';
import './jobitem.less';

Jobitem.propTypes = {
    data: PropTypes.object.isRequired
}
function Jobitem(props) {
    let {data:{job, salary, tags, company:{name, info, num, addr}, user:{avatar, name:username, job:userjob}}} = props;
    return (
        <div className="job-listitem">
            <div className="row1">
                <span>{job}</span>
                <span>{salary}</span>
            </div>
            <div className="row2">
                {
                    tags.map(d => (<span>{d}</span>))
                }
            </div>
            <div className="row3">
                <span>{name}</span>
                <span>{info}</span>
                <span>{num}</span>
            </div>
            <div className="row4">
                <div className="boss-info">
                    <img src={avatar} alt=""/>
                    <span>{username}</span>
                    <span>{userjob}</span>
                </div>
                <div className="addr">
                    {addr}
                </div>
            </div>
        </div>
    )
}
export default Jobitem